﻿@model IEnumerable<MvcDeviceManager.ViewModels.DeviceTypeView>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
        <th>
             设备分类编号
        </th>
        <th>
             设备分类名称
        </th>
        <th>
             设备数量
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
           @Html.DisplayFor(modelitem => item.DeviceTypeId)
        </td>
        <td>
           @Html.DisplayFor(modelitem => item.DeviceTypeName)
        </td>
        <td>
           @Html.DisplayFor(modelitem => item.DeviceCount)
        </td>
        <td>
            @Html.ActionLink("编辑", "Edit", new { id = item.DeviceTypeId }) |
            @Html.ActionLink("明细", "Details", new { id = item.DeviceTypeId }) |
            @Html.ActionLink("删除", "Delete", new { id = item.DeviceTypeId })
        </td>
    </tr>
}

</table>

